package com.voxel.sense.infomsg.module.wifi;

import com.example.com.common.app.BasePresenter;
import com.example.com.common.factory.data.DataSource;

import java.util.List;

import cyy.example.com.facotry.model.api.BaseEntity;
import cyy.example.com.facotry.model.api.response.WifiWarnBean;
import cyy.example.com.facotry.net.helper.NetHelper;

public class WifiWarnPresenter extends BasePresenter<WifiWarnContract.View>
        implements WifiWarnContract.Presenter, DataSource.Callback<BaseEntity<List<WifiWarnBean>>> {
    public WifiWarnPresenter(WifiWarnContract.View view) {
        super(view);
    }


    @Override
    public void onDataNotAvailable(String strRes, int reqId) {

    }

    @Override
    public void getWifiWarnList(int pageNum, int pageSize) {
        NetHelper.getQueryOfflineList(pageNum, pageSize, this);
    }

    @Override
    public void onDataLoaded(BaseEntity<List<WifiWarnBean>> data, int reqId) {
        mView.showList(data.getData());
    }
}
